package com.jdyinfo.ic.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jdyinfo.ic.integration.eweixin.WorkWeixinDao;

@Service("workWeixinService")
public class WorkWeixinService {
	@Autowired
	WorkWeixinDao workWeixinDao;
	
	public String getAppAccessToken() {
		return workWeixinDao.retrieveAppAccessToken();
	}
	
	public String getContactAccessToken() {
		return workWeixinDao.retrieveContactAccessToken();
	}
	
	public String getUserById(String userId) {
		return workWeixinDao.retrieveUserById(userId);
	}
	
	public String getUserByDepartment(String dempartmentId) {
		return workWeixinDao.retrieveUserByDepartment(dempartmentId);
	}
	
	public String getDepartments() {
		return workWeixinDao.retrieveDepartments();
	}
	
	public String getDepartmentById(String dempartmentId) {
		return workWeixinDao.retrieveDepartmentById(dempartmentId);
	}
	
	public String createDepartment(String json) {
		return workWeixinDao.createDepartment(json);
	}
	
	public String deleteDepartment(String dempartmentId) {
		return workWeixinDao.deleteDepartmentById(dempartmentId);
	}
}
